﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TrenchcoatRobots.Datatypes;

namespace TrenchcoatRobots.Classes {
	/// <summary>
	/// The Layer class is responsible for managing different Objects. Each layer class has his own DrawInfo specifying the camera position etc
	/// The Layer class also owns all the GameObjects currently in that layer.
	/// </summary>
	class Layer {
		public Boolean Active { get; set; }
		public Boolean Visible { get; set; }
		public int Depth { get; set; }
		public List<GameObject> GameObjects { get; private set; }
		public DrawInfo DrawInfo { get; set; }

		public Layer(int depth, DrawInfo drawInfo) {
			Active = true;
			Visible = true;
			GameObjects = new List<GameObject>();
			Depth = depth;
			DrawInfo = drawInfo;
		}

		public void AddGameObject( GameObject gObject ) {
			GameObjects.Add( gObject );
		}
		public void AddGameObjectRange( IEnumerable<GameObject> gObjects ) {
			GameObjects.AddRange( gObjects );
		}
	}
}
